// pages/camera-details/camera-details.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    info:{}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.showLoading({
      title: '加载中...',
    })
    let up_id = options.up_id
    let access_token = wx.getStorageSync('access_token')
    wx.request({
      url: 'https://baokang.wshoto.com/wx/myupdetail',
      data: {
        access_token: access_token,
        up_id:up_id
      },
      success: (res) => {
        console.log(res)
        if (res.data.code >= 500) {
          app.getLogin().then(function () {
            console.log('二次登录。。。')
          })
        }
        else if (res.data.code == 1) {
          this.setData({
            info:res.data.info
          })
        }
      },
      complete: (res) => {
        wx.hideLoading()
      }
    })
  },

  

})